package conson.tech.manage.coupons.entity.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.time.LocalDate;

/**
 * InterfaceName: ActivityCouponSaveDto
 * Description: 领券活动添加或修改优惠券列表实体
 * Author: XYF
 * Date: 2020/7/29 9:20
 * Version: 1.0
 */
@Data
public class ActivityCouponSaveDto {

    /**
     * 优惠券批次id
     */
    @ApiModelProperty(value = "优惠券批次id（必填）")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long batchId;

    /**
     * 单用户发放张数
     */
    @ApiModelProperty(value = "单用户发放张数（必填）")
    @NotNull(message = "单用户发放张数")
    private Integer limitNum;
    /**
     * 直接领取活动总数量
     */
    @ApiModelProperty(value = " 直接领取活动总数量（非必填）")
    private Integer totalNum;

    /**
     * 直接发放中优惠券活动开始时间
     */
    @ApiModelProperty(value = "优惠券活动开始时间（非必填）")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate couponStartTime;

    /**
     * 直接发放中优惠券活动结束时间
     */
    @ApiModelProperty(value = "优惠券活动结束时间（非必填）")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate couponEndTime;
}
